package com.lanou3g.k12.mapper;

import com.lanou3g.k12.entity.Article;
import org.apache.ibatis.annotations.Param;

import java.util.List;


public interface ArticleMapper {

    void addArticle(Article article);

    Article findArticleById(Long id);

    void updateArticleById(Article article);

    void deleteArticleById(Long id);

    List<Article> findAllArticles();

    List<Article> findAll();

    List<Article> findByKeyword(String keyword);

    void deleteArticleByIds(Integer[] ids);

    void updateSort(Integer sort);

    void setSort(@Param("id") Long id,@Param("sort") Integer sort);

    Article findByIdForBackend(Long id);

    List<Article> findByKeywordForBackend(String keyword);

    List<Article> findAllForBackend();
}
